<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateQdLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qd_logs', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger("user_id")->comment("签到表用户id");
            $table->string("remark")->comment("用户登记情况")->nullable();
            $table->boolean("has_remark")->comment("是否备注过")->nullable()->default(false);
            $table->string("seller")->comment("要见的销售")->nullable();
        });
        DB::statement("ALTER TABLE `qd_logs` comment'到馆到访签到记录表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qd_logs');
    }
}
